//
//  TopicViewCell.m
//  7.13苏宁框架
//
//  Created by app01 on 15/7/16.
//  Copyright (c) 2015年 lovena. All rights reserved.
//

#import "TopicCollectionCell.h"
#import "TopicCellModel.h"
#import "Common.h"

@implementation TopicCollectionCell


-(void)drawRect:(CGRect)rect{
    
    CGContextRef ref = UIGraphicsGetCurrentContext();
    [[UIColor lightGrayColor]set];
    CGContextSetLineWidth(ref, 0.8);
    CGContextMoveToPoint(ref, _image.left, _image.bottom);
    CGContextAddLineToPoint(ref, _member.left, _member.bottom);
    CGContextAddLineToPoint(ref, _member.right, _member.bottom);
    CGContextAddLineToPoint(ref, _image.right, _image.bottom);
    CGContextStrokePath(ref);
}


-(void)layoutSubviews{
    
    [super layoutSubviews];
    
    _image.image = [UIImage imageNamed:_topicModel.image];
    _title.text = _topicModel.title;
    _member.text = [NSString stringWithFormat:@"%@人参与",_topicModel.member];
    
    
    
}

@end
